package top.ezzz.chats.entity;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import top.ezzz.common.UserBase;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author shenmk
 * @since 2024-01-08
 */
@Data
@TableName("gu_user")
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private Integer userId;

    private String userName;

    private String password;

    private String avatar;

    private Integer status;

    private Integer createTime;

    private Integer loginTime;

    public Users toUsers(UserBase userBase) {
        Users result =  new Users();
        BeanUtil.copyProperties(userBase, result, true);
        return result;
    }


}
